Working principle of dc motor